<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVulsDelayDataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vuls_delay_data', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('vuls_id')->comment('漏洞id');
            $table->integer('applyer')->comment('申请人')->nullable()->default(0);
            $table->string('reason')->comment('说明情况');
            $table->integer('auditer')->default(0)->comment('审核人')->nullable()->default(0);
            $table->timestamps();
            $table->index('vuls_id','vuls_delay_vuls_id_foreign');
            $table->index('applyer','vuls_delay_applyer_foreign');
            $table->index('auditer','vuls_delay_auditer_foreign');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('vuls_delay_data');
    }
}
